package com.lagou.service.impl;

import com.lagou.dao.CourseLessonDao;
import com.lagou.dao.impl.CourseLessonImpl;
import com.lagou.pojo.Course_Lesson;
import com.lagou.service.CourseLessonService;
import com.lagou.utils.DateUtils;

public class CourseLessonServiceImpl implements CourseLessonService {
    private CourseLessonDao courseLessonDao=new CourseLessonImpl();

    /**
     * 保存课时信息
     * @param course_lesson 课时信息
     * @return
     */
    @Override
    public int saveLesson(Course_Lesson course_lesson) {
        course_lesson.setCreate_time(DateUtils.getDateFormart());
        course_lesson.setUpdate_time(DateUtils.getDateFormart());
        return courseLessonDao.saveLesson(course_lesson);
    }

    /**
     * 修改课时接口
     * @param course_lesson
     * @return
     */
    @Override
    public int updateLesson(Course_Lesson course_lesson) {
        course_lesson.setUpdate_time(DateUtils.getDateFormart());
        return courseLessonDao.updateLesson(course_lesson);
    }
}
